import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: "/leave",
    children: [
      {
        path: 'leave',
        name: 'Leave',
        component: () => import("@/views/Leave"),
      },
      {
        path: 'move',
        name: 'Move',
        component: () => import("@/views/Move"),
      },
      {
        path: 'meeting',
        name: 'Meeting',
        component: () => import("@/views/Meeting")
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
